package com.lan.playscript.model;

import org.antlr.v4.runtime.ParserRuleContext;

public abstract class Symbol {
    //符号的名称
    public String name = null;

    //所属作用域
    public Scope enclosingScope = null;

    //可见性，比如public还是private
    public int visibility = 0;

    //Symbol关联的AST节点
    public ParserRuleContext ctx = null;

    public String getName() {
        return name;
    }

    public Scope getEnclosingScope() {
        return enclosingScope;
    }


    public void setName(String name) {
        this.name = name;
    }

    public void setEnclosingScope(Scope enclosingScope) {
        this.enclosingScope = enclosingScope;
    }

    public int getVisibility() {
        return visibility;
    }

    public void setVisibility(int visibility) {
        this.visibility = visibility;
    }

    public ParserRuleContext getCtx() {
        return ctx;
    }

    public void setCtx(ParserRuleContext ctx) {
        this.ctx = ctx;
    }
}